package org.teamswift.crow.rbac.dto;

import lombok.Data;
import org.teamswift.crow.rbac.enums.CrowLoginType;
import org.teamswift.crow.rest.common.ICrowIO;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@Data
public class CrowLoginCredentialDto implements ICrowIO {

    @NotNull(message = "Principal can not be null")
    private String principal;

    @NotNull(message = "Credential can not be null")
    @Size(min = 6, message = "Credential must more than 6 characters")
    private String credential;

    @NotNull(message = "Login type can not be null")
    private CrowLoginType loginType = CrowLoginType.Password;

    private boolean rememberMe;

}
